<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core">

    <ui:composition template="/template.xhtml">
        <ui:define name="title">
            <h:outputText value="#{bundle.ListVehiculoTitle}"></h:outputText>
        </ui:define>
        <ui:define name="body">
            <h:form styleClass="jsfcrud_list_form">
                <h:panelGroup id="messagePanel" layout="block">
                    <h:messages errorStyle="color: red" infoStyle="color: green" layout="table"/>
                </h:panelGroup>
                <h:outputText escape="false" value="#{bundle.ListVehiculoEmpty}" rendered="#{vehiculoController.items.rowCount == 0}"/>
                <h:panelGroup rendered="#{vehiculoController.items.rowCount > 0}">
                    <h:outputText value="#{vehiculoController.pagination.pageFirstItem + 1}..#{vehiculoController.pagination.pageLastItem + 1}/#{vehiculoController.pagination.itemsCount}"/>&nbsp;
                    <h:commandLink action="#{vehiculoController.previous}" value="#{bundle.Previous} #{vehiculoController.pagination.pageSize}" rendered="#{vehiculoController.pagination.hasPreviousPage}"/>&nbsp;
                    <h:commandLink action="#{vehiculoController.next}" value="#{bundle.Next} #{vehiculoController.pagination.pageSize}" rendered="#{vehiculoController.pagination.hasNextPage}"/>&nbsp;
                    <h:dataTable value="#{vehiculoController.items}" var="item" border="0" cellpadding="2" cellspacing="0" rowClasses="jsfcrud_odd_row,jsfcrud_even_row" rules="all" style="border:solid 1px">
                        <h:column>
                            <f:facet name="header">
                                <h:outputText value="#{bundle.ListVehiculoTitle_idVehiculo}"/>
                            </f:facet>
                            <h:outputText value="#{item.idVehiculo}"/>
                        </h:column>
                        <h:column>
                            <f:facet name="header">
                                <h:outputText value="#{bundle.ListVehiculoTitle_placa}"/>
                            </f:facet>
                            <h:outputText value="#{item.placa}"/>
                        </h:column>
                        <h:column>
                            <f:facet name="header">
                                <h:outputText value="#{bundle.ListVehiculoTitle_anoFabricacion}"/>
                            </f:facet>
                            <h:outputText value="#{item.anoFabricacion}"/>
                        </h:column>
                        <h:column>
                            <f:facet name="header">
                                <h:outputText value="#{bundle.ListVehiculoTitle_cedulaPropietario}"/>
                            </f:facet>
                            <h:outputText value="#{item.cedulaPropietario}"/>
                        </h:column>
                        <h:column>
                            <f:facet name="header">
                                <h:outputText value="#{bundle.ListVehiculoTitle_nombrePropietario}"/>
                            </f:facet>
                            <h:outputText value="#{item.nombrePropietario}"/>
                        </h:column>
                        <h:column>
                            <f:facet name="header">
                                <h:outputText value="#{bundle.ListVehiculoTitle_apellidoPropietario}"/>
                            </f:facet>
                            <h:outputText value="#{item.apellidoPropietario}"/>
                        </h:column>
                        <h:column>
                            <f:facet name="header">
                                <h:outputText value="#{bundle.ListVehiculoTitle_modelo}"/>
                            </f:facet>
                            <h:outputText value="#{item.modelo}"/>
                        </h:column>
                        <h:column>
                            <f:facet name="header">
                                <h:outputText value="#{bundle.ListVehiculoTitle_marca}"/>
                            </f:facet>
                            <h:outputText value="#{item.marca}"/>
                        </h:column>
                        <h:column>
                            <f:facet name="header">
                                <h:outputText value="#{bundle.ListVehiculoTitle_color}"/>
                            </f:facet>
                            <h:outputText value="#{item.color}"/>
                        </h:column>
                        <h:column>
                            <f:facet name="header">
                                <h:outputText value="&nbsp;"/>
                            </f:facet>
                            <h:commandLink action="#{vehiculoController.prepareView}" value="#{bundle.ListVehiculoViewLink}"/>
                            <h:outputText value=" "/>
                            <h:commandLink action="#{vehiculoController.prepareEdit}" value="#{bundle.ListVehiculoEditLink}"/>
                            <h:outputText value=" "/>
                            <h:commandLink action="#{vehiculoController.destroy}" value="#{bundle.ListVehiculoDestroyLink}"/>
                        </h:column>
                    </h:dataTable>
                </h:panelGroup>
                <br />
                <h:commandLink action="#{vehiculoController.prepareCreate}" value="#{bundle.ListVehiculoCreateLink}"/>
                <br />
                <br />
                <h:commandLink value="#{bundle.ListVehiculoIndexLink}" action="/index" immediate="true" />
            </h:form>
        </ui:define>
    </ui:composition>

</html>
